<template>
    <div>
        <input type="text" v-model="state.Mname"/>
        <input type="text" v-model="state.MnumName"/>
        <input type="button" value="查询" @click="funshow"/>
     <table>
       <tr>
        <td>房间名称</td>
        <td>名称</td>
        <td>时间</td>
        <td>类型</td>
       </tr>
       <tr v-for="item in list">
        <td>{{item.mname }}</td>
        <td>{{item.mnumName  }}</td>
        <td>{{item.mdateTime.substr(object,10)  }}</td>
        <td>{{item.mstate=1?"已预订":"未预订"  }}</td>
       </tr>
     </table>
    </div>
</template>

<script setup lang="ts">
import { reactive, onMounted,toRefs} from 'vue'   
import { useRoute, useRouter} from 'vue-router'
import axios from 'axios'
const router = useRouter()
const route = useRoute()

const data:any = reactive({
    state:{

        Mname:'',
        MnumName:''
    },
    list:[]
})

const {state,list} = toRefs(data)

onMounted(()=>{
  funshow()
})
const funshow = ()=>{
    axios({

        url:'https://localhost:7265/api/Member/showMember',
        method:'get',
        params:state.value
    
    }).then((res)=>{
        list.value = res.data.data
    })
}



</script>

<style scoped>

</style>